const genNameDic = (array: Array<{ _id: string, username: string, [key: string]: any }>) => {
    const nameDic = {};
    array.forEach((item) => (nameDic[item._id] = item.username));
    return nameDic
}

export default genNameDic